package ZuoYe19;

import javax.swing.text.html.HTMLDocument;
import java.util.ArrayList;
import java.util.Iterator;
import java.util.List;

public class Di5 {
    public static void main(String[] args) {
        List a = new ArrayList();
        for (int i = 0; i < 10; i++) {
            a.add((int) (Math.random() * 10));
        }
        System.out.println(a);
        Iterator b = a.iterator();
        while (b.hasNext()) {
            if (((int) b.next()) % 2 == 0) {
                b.remove();
            }
        }
        System.out.println(a);
    }
}
